|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.interactions.voice.media.VoiceFormatter
org.eclipse.vtp.framework.interactions.voice.media.SimpleEnglishVoiceFormatter
public class SimpleEnglishVoiceFormatter
This implementation of IFormatter provides basic support for the English
language. Audio files are used when available; otherwise text content is
used. This formatter does not perform advanced audio selection, such as
using specific audio files for numbers in the middle of a grouping.
This class can be used as a guide to construct other formatter
implementations, but is not meant to be directly subclassed.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.vtp.framework.interactions.voice.media.VoiceFormatter |
|---|
NEGATIVE_ONE, ZERO |
| Constructor Summary | |
|---|---|
SimpleEnglishVoiceFormatter()
Constructs a new SimpleEnglishVoiceFormatter. |
|
| Method Summary | |
|---|---|
java.util.List |
formatDate(java.util.Date date,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied date information into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatDigits(java.lang.String digits,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied string of digits into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatLetters(java.lang.String text,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied string of letters into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatMoney(java.math.BigDecimal money,
java.util.Currency currency,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied monetary amount into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatNumber(int number,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied number into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatOrdinal(int ordinal,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied ordinal value into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
getDefaultFormats(FormattableContent formattable)
Returns the List of Strings containing the
readable names of any built-in specializations available for given
formattable content. |
java.lang.String |
getLanguageCode()
|
java.lang.String |
getLanguageName()
|
| Methods inherited from class org.eclipse.vtp.framework.interactions.voice.media.VoiceFormatter |
|---|
getAudioContent, getDefaultFormatDefintion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleEnglishVoiceFormatter()
| Method Detail |
|---|
public java.util.List formatDate(java.util.Date date,
java.lang.String formatDefinition,
IResourceManager resourceManager)
IFormatter
date - The date to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided date.
public java.util.List formatDigits(java.lang.String digits,
java.lang.String formatDefinition,
IResourceManager resourceManager)
IFormatter
digits - The digits to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided sequence of
digits.
public java.util.List formatLetters(java.lang.String text,
java.lang.String formatDefinition,
IResourceManager resourceManager)
IFormatter
formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided string of
letters.
public java.util.List formatMoney(java.math.BigDecimal money,
java.util.Currency currency,
java.lang.String formatDefinition,
IResourceManager resourceManager)
IFormatter
money - The amount to translate to text.currency - The currency the amount is in.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided monetary
value.
public java.util.List formatNumber(int number,
java.lang.String formatDefinition,
IResourceManager resourceManager)
IFormatter
number - The number to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided number.
public java.util.List formatOrdinal(int ordinal,
java.lang.String formatDefinition,
IResourceManager resourceManager)
IFormatter
ordinal - The ordinal to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided ordinal
value.public java.lang.String getLanguageCode()
public java.lang.String getLanguageName()
public java.util.List getDefaultFormats(FormattableContent formattable)
IFormatterList of Strings containing the
readable names of any built-in specializations available for given
formattable content. Not all formattable content will have built-in
specializations.DigitsContent type of content. There are
some common rules around how a phone number is read back in contrast to
just a string of numbers.
getDefaultFormats in interface IFormattergetDefaultFormats in class VoiceFormatterformattable - The type of content to find specializations for.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||